package com.spring.trade.dto;

import com.spring.util.DateUtil;
import com.spring.util.DateUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * Created by liuayng on 2016/10/10.
 */
public class PatientTradeOrderDto implements Serializable {
    private static final long serialVersionUID = -2109340518166344768L;

    private String orderNo;

    private Date createTime;

    private Date endTime;

    private Long doctorId;

    private BigDecimal orderMoney;

    private Date payTime;

    private int orderStatus;

    private String payType;

    private int expirTime;

    private int remainingCount;

    private int orderCloseTime;

    private String headPath;

    private String hourServiceName;

    private String msgNumServiceName;
    
    private Integer serviceType;

    private String serviceName;

    private String doctorName;

    private String territory;//擅长

    private String titleName;//职称

    private String deptName;

    private String hospitalName;

    private String mark;

    private String refundReason;//退款理由

    private String addressName;//分部名称

    private String address;//分部地址

    private Date bookTime;//预约时间

    private String bookTimeStr;

    private String institutionName;//机构名称

    
    private BigDecimal discountAmount;//折扣金额

    private Date callStartTime;//开始通话时间

    private String institutionTel;

    private String callUnit;//通话单位

    private int callDuration;//电话咨询购买时间

    private int callTalkTime; //通话累计时间

    private int talkTime;// 此次通话时间

    private String instiTitleName;//机构医生职称

    private Long institutionId;

    public String getInstiTitleName() {
        return instiTitleName;
    }

    public void setInstiTitleName(String instiTitleName) {
        this.instiTitleName = instiTitleName;
    }

    public Long getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public BigDecimal getOrderMoney() {
        return orderMoney;
    }

    public void setOrderMoney(BigDecimal orderMoney) {
        this.orderMoney = orderMoney;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public int getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(int orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public int getExpirTime() {
        return expirTime;
    }

    public void setExpirTime(int expirTime) {
        this.expirTime = expirTime;
    }

    public int getOrderCloseTime() {
        return orderCloseTime;
    }

    public void setOrderCloseTime(int orderCloseTime) {
        this.orderCloseTime = orderCloseTime;
    }

    public String getHourServiceName() {
        return hourServiceName;
    }

    public void setHourServiceName(String hourServiceName) {
        this.hourServiceName = hourServiceName;
    }

    public String getMsgNumServiceName() {
        return msgNumServiceName;
    }

    public void setMsgNumServiceName(String msgNumServiceName) {
        this.msgNumServiceName = msgNumServiceName;
    }

    public Integer getServiceType() {
		return serviceType;
	}

	public void setServiceType(Integer serviceType) {
		this.serviceType = serviceType;
	}

	public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getDoctorName() {
        return doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    public String getTerritory() {
        return territory;
    }

    public void setTerritory(String territory) {
        this.territory = territory;
    }

    public String getTitleName() {
        return titleName;
    }

    public void setTitleName(String titleName) {
        this.titleName = titleName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getHospitalName() {
        return hospitalName;
    }

    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }

    public int getRemainingCount() {
        return remainingCount;
    }

    public void setRemainingCount(int remainingCount) {
        this.remainingCount = remainingCount;
    }

    public String getHeadPath() {
        return headPath;
    }

    public void setHeadPath(String headPath) {
        this.headPath = headPath;
    }

    public String getMark() {
        return mark;
    }

    public void setMark(String mark) {
        this.mark = mark;
    }

	public BigDecimal getDiscountAmount() {
		return discountAmount;
	}

	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}

    public String getRefundReason() {
        return refundReason;
    }

    public void setRefundReason(String refundReason) {
        this.refundReason = refundReason;
    }

    public String getAddressName() {
        return addressName;
    }

    public void setAddressName(String addressName) {
        this.addressName = addressName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getBookTime() {
        return bookTime;
    }

    public void setBookTime(Date bookTime) {
        this.bookTime = bookTime;
    }


    public String getBookTimeStr() {
        if (bookTime != null){
            StringBuffer sb = new StringBuffer();
            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
            LocalDateTime ldt = LocalDateTime.parse(DateUtils.formatDate(bookTime,DateUtils.DEFAULT_TIME_FORMAT), formatter);
            sb.append(ldt.getMonth().getValue()+"月");
            sb.append(ldt.getDayOfMonth()+"日 ");
            sb.append(DateUtils.getWeekOfDate(bookTime,"name")+" ");
            sb.append(DateUtil.getCurrent(bookTime));
            return sb.toString();
        }
        return bookTimeStr;
    }

    public void setBookTimeStr(String bookTimeStr) {
        this.bookTimeStr = bookTimeStr;
    }

    public String getInstitutionName() {
        return institutionName;
    }

    public void setInstitutionName(String institutionName) {
        this.institutionName = institutionName;
    }

    public String getInstitutionTel() {
        return institutionTel;
    }

    public void setInstitutionTel(String institutionTel) {
        this.institutionTel = institutionTel;
    }

    public Date getCallStartTime() {
        return callStartTime;
    }

    public void setCallStartTime(Date callStartTime) {
        this.callStartTime = callStartTime;
    }

    public String getCallUnit() {
        return callUnit;
    }

    public void setCallUnit(String callUnit) {
        this.callUnit = callUnit;
    }

    public int getCallDuration() {
        return callDuration;
    }

    public void setCallDuration(int callDuration) {
        this.callDuration = callDuration;
    }

    public int getCallTalkTime() {
        return callTalkTime;
    }

    public void setCallTalkTime(int callTalkTime) {
        this.callTalkTime = callTalkTime;
    }

    public int getTalkTime() {
        return talkTime;
    }

    public void setTalkTime(int talkTime) {
        this.talkTime = talkTime;
    }

    public Long getInstitutionId() {
        return institutionId;
    }

    public void setInstitutionId(Long institutionId) {
        this.institutionId = institutionId;
    }
}
